#ifndef __BLACK_SPHERE_H__
#define __BLACK_SPHERE_H__

#include "maths/default.h"
#include "maths/vector.h"

namespace black
{
	class sphere
	{
	public:
		bFORCEINLINE sphere();
		bFORCEINLINE sphere( const vec3& vCenter, float fRadius );

		bFORCEINLINE bool	contains	( const vec3& v ) const;
		bFORCEINLINE bool	contains	( const sphere& v ) const;
		bFORCEINLINE bool	intersects	( const sphere& v ) const;

		bFORCEINLINE bool	isValid		() const;

		void fastSet( const vec3 pPoints[], const size_t szNbPoints );

		vec3	center;
		float	radius;

		static const sphere		UNIT;
	};

	class sphere_128
	{
	public:
		vec3_128	center;
		float		radius;
	};
}

#include "maths/inl/sphere.inl"

#endif // __BLACK_SPHERE_H__
//---------------------------------------------------------------------------------------
// Copyright (c) 2009 Jounayd Id Salah.
// All rights reserved.
//---------------------------------------------------------------------------------------
